package demo05.FactoryPattern.Factory;

import demo05.FactoryPattern.FactoryImp.PizzaIngredientFactory;
import demo05.FactoryPattern.pizzaForm.BlackOlives;
import demo05.FactoryPattern.pizzaForm.Eggplant;
import demo05.FactoryPattern.pizzaForm.FrozenClams;
import demo05.FactoryPattern.pizzaForm.MozzarellaCheese;
import demo05.FactoryPattern.pizzaForm.PlumTomatoSauce;
import demo05.FactoryPattern.pizzaForm.SlicedPepperoni;
import demo05.FactoryPattern.pizzaForm.Spinach;
import demo05.FactoryPattern.pizzaForm.ThickCrustDough;
import demo05.FactoryPattern.pizzaFormImp.Cheese;
import demo05.FactoryPattern.pizzaFormImp.Clams;
import demo05.FactoryPattern.pizzaFormImp.Dough;
import demo05.FactoryPattern.pizzaFormImp.Pepperoni;
import demo05.FactoryPattern.pizzaFormImp.Sauce;
import demo05.FactoryPattern.pizzaFormImp.Veggies;

/**
 * 子类工厂
 * */
public class ChicagoPizzaIngredientFactory implements PizzaIngredientFactory {

	//实现的方法通常有工厂方法实现
	
	public Dough createDough() {
		return new ThickCrustDough(); 
	}

	public Sauce createSauce() {
		return new PlumTomatoSauce();
	}

	public Cheese createCheese() {
		return new MozzarellaCheese();
	}

	public Veggies[] createVeggies() {
		Veggies veggies[] = { new BlackOlives(), 
		                      new Spinach(), 
		                      new Eggplant() };
		return veggies;
	}

	public Pepperoni createPepperoni() {
		return new SlicedPepperoni();
	}

	public Clams createClam() {
		return new FrozenClams();
	}
}
